import {api} from "@/boot/axios";

export function getProject(data) {
    if (data == null) {
        return api(
            {
                url: "/project/getall",
                method: "post",
                data: {}
            })
    }
    return api(
        {
            url: "/project/getall",
            method: "post",
            data: data
        }
    );
}

export function getDept(){
    return api({
        url:"/dept/getall",
        method:"get",
    })
}
export function deleteProject(id){
    return api({
        url:'/project/delete?'+new URLSearchParams({project_id:id}),
        method:'get'
    })
}
export function getNotFinish() {
    return api({
        url: "/project/notfinish",
        method: "get",
    })
}
export function projectLevel() {
    return api({
        url: "/project_user/info",
        method: "get",
    })
}
export function getProjectInfo(id) {
    return api({
        url: "/project_user/project?"+new URLSearchParams({project_id:id}),
        method: "get",
    })
}
export function updateProject(data){
    return api({
        url:'/project/update',
        method:'post',
        data:data
    })
}